<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button onclick="alert('hello')">click1</button>
		<input type="button" value="click2" onclick="cli()" onmouseover="over()" onmouseout="out()"/>
		<input type="text" onfocus="focu()" onblur="blu()">

		<input id="btnId" type="button" value="click3" />

		<script type="text/javascript">
			window.onload = function () {
				var btn = document.getElementById('btnId');
				btn.onclick = function () {
					console.log('onlick');
				}
				btn.onmouseover = function () {
					console.log('onmouseover');
				}
				btn.onmouseout = function () {
					console.log('onmouseout');
				}
			}

			function cli() {
				console.log('cli');
			}

			function over() {
				console.log('over');
			}

			function out() {
				console.log('out');
			}

			function focu() {
				console.log('focus');
			}

			function blu() {
				console.log('blur');
			}
		</script>
	</body>
</html>
